#include "common.h"
#include "uvm_hdl.h"

/*
VERI_BEGIN_TEST
   vpi_printf("jelly1\n");
   PRINT("\nstart a BFM test demo\n")
   vpi_printf("jelly2\n");
   REG_WRITE(0x0, 0x0);
   REG_WRITE(0x4, 0x5);
   REG_WRITE(0x8, 0xA);
   REG_WRITE(0xC, 0xF);

   PRINT("begin wait for 50us")
   wait_us(50);
   PRINT("end wait for 50us")
   ezchip_hdl_read("TestbenchTop.rst_n");

   PRINT("complete a BFM test demo")
VERI_END_TEST(0)
*/
VERI_BEGIN_TEST
   vpi_printf("jelly1\n");
   PRINT("\nstart a BFM test demo\n")
   vpi_printf("jelly2\n");
   U32 a, b, c;

   a = 1;
   b = 2;
   c = 3;

   RegA *reg_a;
   RegB *reg_b;
   RegC *reg_c;

   MALLOC_REG(reg_a, RegA, 0x4)
   MALLOC_REG(reg_b, RegB, 0x8)
   MALLOC_REG(reg_c, RegC, 0xc)

   reg_a->field2 = a;
   reg_b->field3 = b;
   reg_c->value = c;
   reg_b->field3 = 0x8;

   PRINT("begin wait for 50us")
   wait_us(50);
   PRINT("end wait for 50us")
   ezchip_hdl_read("TestbenchTop.rst_n");

   PRINT("complete a BFM test demo")
VERI_END_TEST(0)
